{php include wl_template('common/header');}
<style type='text/css'>
    .trhead td{background:#efefef;text-align: center}
    .trbody td{text-align: center;vertical-align:top;border-left:1px solid #f2f2f2;overflow: hidden;font-size:12px;}
    .trorder{background:#f8f8f8;border:1px solid #f2f2f2;text-align:left;}
    .ops{border-right:1px solid #f2f2f2;text-align: center;}
    .ops a,.ops span{margin: 3px 0;}
    .table-top{padding: 0 20px;background: #f7f7f7;border-bottom: 1px solid #e5e5e5;}
    .table-top .op:hover{color: #000;}
    .tables{border:1px solid #e5e5e5;font-size: 14px;line-height: 18px;}
    .tables:hover{border:1px solid #1ab394;}
    .table-row,.table-header,.table-footer,.table-top{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;justify-content: center;-webkit-justify-content: center;-webkit-align-content: space-around;align-content: space-around;}
    .tables .table-row.table-top>div{padding: 10.5px 0;}
    .tables .table-row .ops.list-inner{border-right:none;}
    .tables .table-row .buyremark{background:#fdeeee;color:red;flex: 1;padding: 10px 20px!important;}
    .tables .table-row .remark{background:#ffffcc;color:red;flex: 1;padding: 10px 20px!important;}
    .tables .list-inner{border-right: 1px solid #efefef;vertical-align: middle;}
    .table-row .goods-des .title{width:180px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
    .table-row .goods-des{border-right: 1px solid #efefef;vertical-align: middle;width:400px;text-align: left;padding: 14px 0;}
    .table-row .list-inner{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;text-align: center;display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;-webkit-align-items: center;align-items: center;-webkit-justify-content: center;justify-content: center;-webkit-flex-direction: column;flex-direction: column;}
    .saler>div{width:130px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
    .table-row .list-inner.ops, .table-row .list-inner.paystyle{-webkit-flex-direction: column;flex-direction: column;-webkit-justify-content: center;justify-content: center;}
    .table-header{background:#f8f8f8;height: 40px;line-height: 40px;padding: 0 20px;font-weight: 600;}
    .table-header .others{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;text-align: center;}
    .table-footer{border-top: 1px solid #efefef;margin:0 20px;padding: 10.5px 0;}
    .table-footer>div, .table-top>div{-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;height:100%;}
    .fixed-header div{padding:0;}
    .fixed-header.table-header{display: none;}
    .fixed-header.table-header.active{display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;}
    .shop{display: inline-block;width:48px;height:18px;text-align: center;border:1px solid #1b86ff;color: #1b86ff;margin-right: 10px;}
    .min_program{display: inline-block;width:48px;height:18px;text-align: center;border:1px solid #ff5555;color: #ff5555;margin-right: 10px;}
    .ordertype{display: inline-block;height:18px;margin-right: 10px;border-radius: 0;font-weight: 500;}
    .popover{border: 1px solid #efefef;border: 1px solid #efefef;border-radius: 6px;-webkit-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));-moz-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .1));-o-filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .1));filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));padding: 0!important;}
    .popover-content{padding: 10px!important;font-size:12px;}
    .popover-content table{margin-bottom: 0!important;}
    .popover.right>.arrow{border-right-color: #efefef;}
    .cored{color: orangered;}
</style>
<ul class="nav nav-tabs">
    <li class="active"><a href="javascript:;">售后记录</a></li>
</ul>
<div class="app-content">
    <div class="app-filter">
        <div class="filter-list">
        <form action="" method="get" class="form-horizontal" role="form" id="form1">
            <input type="hidden" name="c" value="site" />
            <input type="hidden" name="a" value="entry" />
            <input type="hidden" name="m" value="{MODULE_NAME}" />
            <input type="hidden" name="p" value="order" />
            <input type="hidden" name="ac" value="orderAfterSales" />
            <input type="hidden" name="do" value="afterlist" />
            <input type="hidden" name="plugin" value="{$_GPC['plugin']}" />
            <input type="hidden" name="status" value="{$_GPC['status']}" />
            <div class="form-group">
                <label class="col-sm-2 control-label">售后状态</label>
                <div class="col-sm-9">
                    <div class="btn-group">
                        <a href="{php echo wl_filter_url('status:');}" class="btn {if empty($_GPC['status'])}btn-primary{else}btn-default{/if}">不限</a>
                        <a href="{php echo wl_filter_url('status:1');}" class="btn {if $_GPC['status'] == '1'}btn-primary{else}btn-default{/if}">待处理</a>
                        <a href="{php echo wl_filter_url('status:5');}" class="btn {if $_GPC['status'] == '5'}btn-primary{else}btn-default{/if}">处理中</a>
                        <a href="{php echo wl_filter_url('status:2');}" class="btn {if $_GPC['status'] == '2'}btn-primary{else}btn-default{/if}">已完成</a>
                        <a href="{php echo wl_filter_url('status:3');}" class="btn {if $_GPC['status'] == '3'}btn-primary{else}btn-default{/if}">已驳回</a>
                        <a href="{php echo wl_filter_url('status:4');}" class="btn {if $_GPC['status'] == '4'}btn-primary{else}btn-default{/if}">用户取消</a>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">订单类型</label>
                <div class="col-sm-9">
                    <div class="btn-group">
                        <a href="{php echo wl_filter_url('plugin:');}" class="btn {if empty($_GPC['plugin'])}btn-primary{else}btn-default{/if}">不限</a>
                        <a href="{php echo wl_filter_url('plugin:rush');}" class="btn {if $_GPC['plugin'] == 'rush'}btn-primary{else}btn-default{/if}">抢购</a>
                        {if agent_p('groupon')}
                        <a href="{php echo wl_filter_url('plugin:groupon');}" class="btn {if $_GPC['plugin'] == 'groupon'}btn-primary{else}btn-default{/if}">团购</a>
                        {/if}
                        <a href="{php echo wl_filter_url('plugin:wlfightgroup');}" class="btn {if $_GPC['plugin'] == 'wlfightgroup'}btn-primary{else}btn-default{/if}">拼团</a>
                        <a href="{php echo wl_filter_url('plugin:coupon');}" class="btn {if $_GPC['plugin'] == 'coupon'}btn-primary{else}btn-default{/if}">卡券</a>
                        {if agent_p('bargain')}
                        <a href="{php echo wl_filter_url('plugin:bargain');}" class="btn {if $_GPC['plugin'] == 'bargain'}btn-primary{else}btn-default{/if}">砍价</a>
                        {/if}
                        {if agent_p('activity')}
                        <a href="{php echo wl_filter_url('plugin:activity');}" class="btn {if $_GPC['plugin'] == 'activity'}btn-primary{else}btn-default{/if}">活动</a>
                        {/if}
                        {if agent_p('hotel')}
                        <a href="{php echo wl_filter_url('plugin:hotel');}" class="btn {if $_GPC['plugin'] == 'hotel'}btn-primary{else}btn-default{/if}">酒店</a>
                        {/if}
                        {if agent_p('citydelivery')}
                        <a href="{php echo wl_filter_url('plugin:citydelivery');}" class="btn {if $_GPC['plugin'] == 'citydelivery'}btn-primary{else}btn-default{/if}">同城配送</a>
                        {/if}
                    </div>
                </div>
            </div>
            <div class="form-group form-inline">
                <label class="col-sm-2 control-label">售后搜索</label>
                <div class="col-sm-9">
                    <select name="keywordtype" class="form-control">
                        <option value="1" {if $_GPC['keywordtype']==1}selected="selected"{/if}>订单号</option>
                        <option value="2" {if $_GPC['keywordtype']==2}selected="selected"{/if}>商户ID</option>
                        <option value="3" {if $_GPC['keywordtype']==3}selected="selected"{/if}>买家ID</option>
                    </select>
                    <input type="text" name="keyword" class="form-control" value="{$_GPC['keyword']}"  placeholder="请输入关键字"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">时间筛选</label>
                <div class="col-md-3">
                    <select name="timetype" class="form-control">
                        <option value="">请选择时间类型</option>
                        <option value="1" {if $_GPC['timetype']==1}selected="selected"{/if}>申请时间</option>
                        <option value="2" {if $_GPC['timetype']==2}selected="selected"{/if}>完成时间</option>
                    </select>
                </div>
                <div class="col-md-2">
                    {php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d',$starttime), 'endtime' => date('Y-m-d', $endtime)));}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-9">
                    <button class="btn btn-primary" id="search">筛选</button>
                </div>
            </div>
        </form>
        </div>
        <div class="app-table-list">
            <div class="row table-responsive">
                <div class="col-md-12">
                    <div class="">
                        <div class="table-header">
                            <div style='width: 400px;text-align: left;'>商品</div>
                            <div class="others">买家</div>
                            <div class="others">商家</div>
                            <div class="others">价格/支付</div>
                            <div class="others">状态</div>
                            <div class="others">操作</div>
                        </div>
                        {loop $afterlist $item}
                        <div class="table-row"><div style='height:20px;padding:0;border-top:none;'></div></div>
                        <div class="tables">
                            <!-- 头部 -->
                            <div class='table-row table-top'>
                                <div style="text-align: left;color: #8f8e8e;">
                                    <span style="font-weight: bold;margin-right: 10px;color: #2d2d31">
                                        <span class="label label-{$item['plugincss']} ordertype">{$item['plugintext']}</span>申请时间:{php echo date('Y-m-d H:i:s',$item['createtime'])}
                                    </span>
                                    订单编号：{$item['orderno']}
                                    {if $item['type'] == 1}
                                    <span class='label label-warning'>要求退款</span>
                                    {else if $item['type'] == 2}
                                    <span class='label label-info'>要求换货</span>
                                    {else if $item['type'] == 3}
                                    <span class='label label-info'>要求退货退款</span>
                                    {/if}
                                </div>
                            </div>
                            <!-- 主体 -->
                            <div class='table-row' style="margin:0  20px">
                                <!-- 商品信息 -->
                                <div class="goods-des">
                                    <div style="display: -webkit-box;display: -webkit-flex;display: -ms-flexbox;display: flex;margin: 10px 0">
                                        <img src="{php echo tomedia($item['goodsimg'])}" style='width:70px;height:70px;border:1px solid #efefef; padding:1px;'onerror="this.src='../addons/weliam_smartcity/web/resource/images/nopic.jpg'">
                                        <div style="-webkit-box-flex: 1;-webkit-flex: 1;-ms-flex: 1;flex: 1;margin-left: 10px;text-align: left;display: flex;align-items: center">
                                            <div>
                                                <div class="title">
                                                    {$item['goodsname']}<br/>
                                                    {if $item['goodsid']>0}ID:{$item['goodsid']}<br/>{/if}
                                                    <span style="color: #999">
                                                        {if !empty($item['optiontitle'])}规格：{$item['optiontitle']}{/if}
                                                    </span>
                                                </div>
                                            </div>
                                            <span style="float: right;text-align: right;display: inline-block;width:130px;">
                                                ￥{$item['goodsprice']}<br/>
	                                    	    x{$item['num']}
	                                        </span>
                                        </div>
                                    </div>
                                </div>
                                <!-- 买家信息 -->
                                <div class="list-inner saler" style='text-align: center;' >
                                    <div>
                                        <a {if $_W['aid']} href="javascript:;" {else} href="{php echo web_url('member/wlMember/memberIndex',array('mid'=>$item['mid']))}" {/if} > {$item['nickname']}</a>
                                        <br/>
                                        {$item['realname']}<br/>{$item['mobile']}<br/>MID:{$item['mid']}
                                    </div>
                                </div>
                                <!-- 商户 -->
                                <div class="list-inner saler" style='text-align: center;' >
                                    <div>
                                        {$item['storename']}<br/>SID:{$item['sid']}
                                    </div>
                                </div>
                                <!-- 支付 -->
                                <div class="list-inner paystyle" style='text-align:center;' >
                                    <span style="color:orangered;display: inline">￥{$item['orderprice']}</span>
                                    <!-- 已支付 -->
                                    {if $item['paytype']==1}
                                    <span> <i class="icow icow-yue text-warning" style="font-size: 17px;"></i><span>余额支付</span></span>
                                    {elseif $item['paytype']==6}
                                    <span> <i class="icow icow-kuajingzhifuiconfukuan text-danger" style="font-size: 17px"></i>后台付款</span>
                                    {elseif $item['paytype']==2}
                                    <span> <i class="icow icow-weixinzhifu text-success" style="font-size: 17px"></i>微信支付</span>
                                    {elseif $item['paytype']==3}
                                    <span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>支付宝支付</span>
                                    {elseif $item['paytype']==5}
                                    <span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>小程序支付</span>
                                    {elseif $item['paytype']==4}
                                    <span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>货到付款</span>
                                    {elseif empty($item['paytype']) && $item['actualprice'] == 0 }
                                    <span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>0元购</span>
                                    {elseif $item['paytype']==7}
                                    <span><i class="icow icow-zhifubaozhifu text-primary" style="font-size: 17px"></i>混合支付</span>
                                    {else}
                                    <label class='label label-danger'>未知方式</label>
                                    {/if}
                                </div>
                                <!--状态-->
                                <div  class='list-inner' style='line-height:20px;text-align:center' >
                                    {if $item['status'] == 1}
                                    <span class='label label-warning'>待处理</span>
                                    {else if $item['status'] == 2}
                                    <span class='label label-success'>已完成</span>
                                    {else if $item['status'] == 3}
                                    <span class='label label-danger'>已拒绝</span>
                                    {else if $item['status'] == 4}
                                    <span class='label label-primary'>用户取消</span>
                                    {else if $item['status'] == 5}
                                    {if !empty($item['expresssn'])}
                                    <span class='label label-info'>回寄中</span>
                                    {else}
                                    <span class='label label-info'>处理中</span>
                                    {/if}
                                    {/if}
                                    {if $item['dotime']}
                                    {php echo date('Y-m-d H:i:s',$item['dotime'])}
                                    {/if}
                                    {if !empty($item['expresssn'])}
                                    <a class='op' data-toggle="ajaxModal" href="{php echo web_url('order/wlOrder/logisticsrecord',array('id' => $item['id'],'type' => 'after'))}">回寄物流信息</a>
                                    {/if}
                                </div>
                                <!--操作-->
                                <div  class="ops list-inner"  style='text-align:center' >
                                    {if $item['status'] == 1 || $item['status'] == 5}
                                    {if !is_store() || $_W['wlsetting']['orderset']['storerefund'] > 0}
                                    <a class='op'  data-toggle='ajaxModal' href="{php echo web_url('order/wlOrder/refund',array('id'=>$item['orderid'],'afterid'=>$item['id'],'type'=>$item['ordertype'],'is_jurisdiction'=>1))}">退款</a>
                                    {/if}
                                    {/if}
                                    {if $item['status'] == 1}
                                    {if $item['type'] > 1}
                                    <a class='op' data-toggle='ajaxPost' href="{php echo web_url('order/wlOrder/agree',array('id'=>$item['orderid'],'afterid'=>$item['id'],'type'=>$item['ordertype']))}" data-confirm="确定同意用户的售后要求吗？">同意</a>
                                    {/if}
                                    <a href="{php echo web_url('order/orderAfterSales/rejectafter',array('id'=>$item['id']))}" data-toggle="ajaxModal">驳回</a>
                                    {/if}
                                    {if !empty($item['detailurl'])}
                                    <a class='op' href="{$item['detailurl']}" target='_blank' >订单详情</a>
                                    {/if}
                                </div>
                            </div>
                        </div>
                        {/loop}
                        <div style="padding: 20px 0;text-align: right" >
                            {$pager}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>



{php include wl_template('common/footer');}